{% extends "base_edit.html" %}

{% load breadcrumbs %}
{% load details %}

{% block breadcrumbs %}
    {% add_crumb 'Home' '/' %}
    {% add_crumb 'Partners' 'partner_list' %}
    {% if owner_class == "Contact" %}
    {% add_crumb 'Contacts' 'contact_list' %}
    {% add_crumb owner owner.get_absolute_url %}
    {% add_crumb 'Addresses' 'contact_addresses' owner.pk %}
    {% else %}
    {% add_crumb owner owner.get_absolute_url %}
    {% add_crumb 'Addresses' 'partner_addresses' owner.pk %}
    {% endif %}
    {% if object.pk %}
    {% add_crumb object %}
    {% add_crumb "Edit" %}
    {% else %}
    {% add_crumb "Add" %}
    {% endif %}
{% endblock %}

{% block editform %}
<table class="properties">
    {% property_table form "['type', ['street', 'number'], ['city', 'zip'], ['state', 'country']]" %}
</table>
{% endblock %}
